package state.socket;

import state.GameForm;

public class Flow extends GameForm implements DataReceiveListener {
  private int flowHeader = 0;

  public Flow(int flowHeader1) {
    this.flowHeader = flowHeader1;
  }

  public final DataPackage createPackage(int header) {
    DataPackage dataPackage = DataPackage.createDataPackage1(flowHeader);
    dataPackage.putString("header");
    dataPackage.putInt(MapDataPackage.INT_TYPE);
    dataPackage.putInt(header);
    return dataPackage;
  }

  public final DataPackage createPackage1(int header, int size) {
    DataPackage dataPackage = DataPackage.createDataPackage3(flowHeader, size);
    dataPackage.putString("header");
    dataPackage.putInt(MapDataPackage.INT_TYPE);
    dataPackage.putInt(header);
    return dataPackage;
  }

  public final MapDataPackage createMapPackage(int header) {
    return MapDataPackage.getMapPackage(createPackage(header));
  }

  public final MapDataPackage createMapPackage1(int header, int size) {
    return MapDataPackage.getMapPackage(createPackage1(header, size));
  }

  public void onConnectDone() {
  }

  public void onConnectFail() {
  }

  public void onDisconnect() {
  }

  public void onRecieveData(DataPackage dataPackage) {
  }
}
